﻿<%@ Page Title="" Language="C#" MasterPageFile="ConsultantSearchPageMasterPage.master" AutoEventWireup="true" CodeFile="ConsultantSearchResult.aspx.cs" Inherits="ConsultantSearchResult" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script language="javascript" type="text/javascript">
function AddToFavorite(CompanyID)
{
 var oWnd = $find("<%=radWin.ClientID%>");
 oWnd.setUrl("AddToFavorite.aspx?CompanyID=" + CompanyID);
 oWnd.show();
}

function InviteToManageJob(CCID)
{

 var oWnd = $find("<%=radWin.ClientID%>");
 oWnd.setUrl("InviteForManageJob.aspx?CCID=" + CCID);
 oWnd.show();
}

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

      <!-- left col open -->
      <div class="leftcol">
        <!-- page title section open -->
        <div class="pagetitle_bg">
          <div class="pagetitle_wrap">
            <h1 class="maintitle"><a href="#">Consultant Search Result</a></h1>

          </div>
        </div>
        <!-- page title section close -->
        <!-- main box open -->
        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont"> <!-- title open -->
            <div class="subtitle_wrap">

              <div class="icon"><a href="javascript: void(0)" class="addfav">Add to favorite</a><a href="javascript: void(0)" class="inviteforbid_ico">Invite to Manage Job</a></div>
            </div>
            <!-- title close -->
            
            <div class="cont_search">
              <!-- table heading open -->
              <div class="headdrow">
                <div class="headdrow_lft">
                  <div class="headdrow_rgt">

                    <!-- headings open -->
                    <div class="col1">Consultant</div>
                    <div class="col2">Location</div>
                    <div class="col3">Earning &amp; Rating</div>
                    <div class="col4">Action</div>
                    <!-- headings close -->

                  </div>
                </div>
              </div>
              <!-- table heading close -->
              <!-- table row open -->
               <%if (ConsultantTablePerPage.Count > 0)
                 {
                     for (int i = 0; i < ConsultantTablePerPage.Count; i++)
                 {%>
              <div class="tblrow">
                <div class="col1">
               
                  <p class="byr_img_blk">
                  <a href="ContractorPublicProfile.aspx?ID=<%=ConstructionBidOnline.Biz.ConsultantsInformation.GetConsultantsInformationByID(ConsultantTablePerPage[i].RegisteredUserID).ProfileID %>">
                  <% profileimageObj = ConstructionBidOnline.Biz.ProfileImages.GetProfileImage(ConsultantTablePerPage[i].RegisteredUserID);
                     if (profileimageObj != null)
                     {%>
                  <img src="../ProfileImages/<%=profileimageObj.ProfileImage %>" alt="" />
                  <%}
                     else
                     { 
                     %>
                     <img src="../images/img.jpg" alt="" />
                     <%} %>
                  </a>
                  </p>
                  <p><a href="ConsultantPublicProfile.aspx?ID=<%=ConstructionBidOnline.Biz.ConsultantsInformation.GetConsultantsInformationByID(ConsultantTablePerPage[i].RegisteredUserID).ProfileID %>"><%=ConsultantTablePerPage[i].FirstName%> <%=ConsultantTablePerPage[i].LastName%></a></p>

                  <p><%=ConsultantTablePerPage[i].AddressLine1%> <%=ConsultantTablePerPage[i].AddressLine2%></p>
                </div>
                <div class="col2"><%=ConsultantTablePerPage[i].City%></div>
                <div class="col3">
                	<div class="earning_det">
                    	
                    	<div class="leftcol">Ratings:</div><div class="righttcol">
                            <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_gry_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: 50%;">&nbsp;</div>
                                    </div>
                      <br />
                    	<p><a href="#">0</a> review(s)</p>
                    	</div>
                    	<div class="leftcol">Earnings:</div><div class="righttcol"><span>$ 0.00</span></div>
                    </div>
                
                
                </div>
                <div class="col4">
                <a href="javascript: void(0)" onclick="InviteToManageJob('<%=ConsultantTablePerPage[i].RegisteredUserID%>'); return false;" class="ico_invitebid"><img src="../images/trans.gif" alt="" width="1" height="1" /></a>
                <a href="javascript: void(0)" onclick="AddToFavorite('<%=ConsultantTablePerPage[i].RegisteredUserID%>'); return false;" class="ico_addtofav"><img src="../images/trans.gif" alt="" width="1" height="1" /></a></div>
              </div>
              <%}}
                 else
                 { %>
                 <div class="tblrow">
                <div class="col1">
               
                  <p><a href="#">No Record found according to your search criteria.</a></p>
                </div>
              </div>
                 <%} %>
              <!-- table row open -->

            </div>
            <!-- edit mem close -->
          </div>
          <div class="mainbox_bttm"></div>
        </div>
        <div class="box_sep"></div>
        <div class="clear"></div>
        <!-- pagination open -->
    <div class="pagination">
    <%
        string classname;
        if (ConsultantTableForPaging.Count > 10)
      {
          int i = 0; int j = 1;
          while (i < ConsultantTableForPaging.Count)
          { 
              i = i + 10;
              classname = Int32.Parse(Request.QueryString["page"]) == j ? "this-page" : "";
              %>
              <a class="<%=classname%>" href="JobSearchResult.aspx?page=<%Response.Write(j);%>"><%Response.Write(j);%></a>
              <%
                  j++;
          }
      } %>

</div><!-- pagination close -->
        <!-- main box close -->
      </div>
      <!-- left col close -->
      
      <!-- top section open -->
      <!-- top section close -->




<telerik:RadWindow ID="radWin" name="radWin" RegisterWithScriptManager="true" 
        DestroyOnClose="false" Height="440px" Width="505px" VisibleStatusbar="false"
        Title="Forward Job" EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close, Move, Reload"
        Modal="true"  NavigateUrl="AddtoFavourite.aspx" runat="server" 
        VisibleTitlebar="true" Animation="Resize" 
        AnimationDuration="1000" AutoSize="false"></telerik:RadWindow>
</asp:Content>

